﻿using System;
using SD.Database;

namespace smallDeimos
{
    public partial class Admin : System.Web.UI.Page
    {
        System.Timers.Timer t;
        protected void Page_Load(object sender, EventArgs e)
        {
          string   User = Session["User"].ToString();
          if (User.Equals("aDmiN") == false)
          {
              Response.Redirect("Default.aspx");
              return;
          }
            //t = (System.Timers.Timer)Application["t"];
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
           
        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            StoredProcedures.RestartGame();
        }

        protected void Button3_Click(object sender, EventArgs e)
        {
            StoredProcedures.CreateGame(); 
        }

        protected void Button4_Click(object sender, EventArgs e)
        {
            StoredProcedures.RunQuery(TextBox1.Text);
        }

        protected void Button5_Click(object sender, EventArgs e)
        {
            StoredProcedures.CleanDB();
        }

        protected void Button6_Click(object sender, EventArgs e)
        {
            //StoredProcedures.SentMessageToAllPlayers(TextBox2.Text);
        }
    }
}
